using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class ATS_TestResultsMap : EntityTypeConfiguration<ATS_TestResults>
    {
        public ATS_TestResultsMap()
        {
            // Primary Key
            this.HasKey(t => t.id);

            // Properties
            this.Property(t => t.Test)
                .HasMaxLength(50);

            this.Property(t => t.Result)
                .HasMaxLength(50);

            this.Property(t => t.Status)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("ATS_TestResults");
            this.Property(t => t.id).HasColumnName("id");
            this.Property(t => t.Test).HasColumnName("Test");
            this.Property(t => t.Result).HasColumnName("Result");
            this.Property(t => t.Status).HasColumnName("Status");
        }
    }
}
